package com.mx.recycleview.base

import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup

/**
 * 对比BaseSimpleAdapt：直接传入资源id，省去了重写createItem
 */
abstract class BaseLayoutAdapt<T>(private val layoutId: Int, list: ArrayList<T> = arrayListOf()) :
    BaseSimpleAdapt<T>(list) {
    override fun createItem(inflater: LayoutInflater, parent: ViewGroup, viewType: Int): View {
        return inflater.inflate(layoutId, parent, false)
    }
}